package com.sunlands.zlcx.usercenter.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * @author anjl
 * @date 1:02 PM 2019/4/15
 * description:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity(name = "tz_user_ext_info")
@DynamicUpdate
@DynamicInsert
public class UsersExtInfoDO implements Serializable{

    public static final String VERSION = "version";
    public static final String PHONE_MODEL = "phone-model";
    private static final long serialVersionUID = -7980857389022888129L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * app 版本
     */
    private String version;

    /**
     * 手机型号
     */
    private String phoneModel;

    /**
     * 手机系统
     */
    private String operatingSystem;
    /**
     * 研究生广告弹出次数
     */
    private Integer postGraduateAdvertFrequencyTimes;
    /**
     * 创建时间
     */
    @CreationTimestamp
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    /**
     * 修改时间
     */
    @UpdateTimestamp
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;


}
